<div class="add_category">
    <a href="/admin/pages/add/"><img src="/res/img/admin/add_icon.gif" /></a> 
    <a href="/admin/pages/add/">Добавить страницу</a>
</div>

<div id="content">
		<div id="inner">
		<table cellspacing="0" cellpadding="4">
			<thead>
				<tr>
					<td width="250px">Название страницы</td>
                    <td>Описание</td>
					<td width="130px">Редактировать</td>
				</tr>
			</thead>
			<tbody class="cat">
			{foreach from=$pages item=doc}
				<tr class="page" id="{$doc.id}">
					<th><img src="/res/img/admin/page.png" /><a href="/admin/pages/edit/{$doc.id}">{$doc.name}</a></th>
					<td>{$doc.description}</td>
					<td class="edit">
						<a href="/admin/pages/add/{$doc.id}/"><img src="/res/img/admin/add_icon.gif" /></a>
                        <a href="/admin/pages/edit/{$doc.id}"><img src="/res/img/admin/edit.gif" /></a>
                    </td>
				</tr>
			{if $doc.parent}
				{foreach from=$doc.parent item=doc}
                {if $doc.is_admin != 1}
				<tr class="page" id="{$doc.id}">
					<th><img src="/res/img/admin/page.png" /><img src="/res/img/admin/sub_category_icon.gif" class="left" /><a href="/admin/pages/edit/{$doc.id}">{$doc.name}</a></th>
					<td>{$doc.description}</td>
					<td class="edit">
						<a href="/admin/pages/add/{$doc.id}/"><img src="/res/img/admin/add_icon.gif" /></a>
                        <a href="/admin/pages/edit/{$doc.id}"><img src="/res/img/admin/edit.gif" /></a>
						{if $doc.is_admin == 0}{if !$doc.parent}<a class="delete" href="#" rel="{$doc.name}"><img src="/res/img/admin/delete_icon.gif" /></a>{/if}{/if}
                    </td>
				</tr>
                {/if}
                {if $doc.parent}
                    {foreach from=$doc.parent item=doc}
                    {if $doc.is_admin != 1}
                    <tr class="page" id="{$doc.id}">
                        <th><img src="/res/img/admin/page.png" /><img src="/res/img/admin/sub_category_icon.gif" class="left"  style="padding-left:20px;"/><a href="/admin/pages/edit/{$doc.id}">{$doc.name}</a></th>
                        <td>{$doc.description}</td>
                        <td class="edit">
							<a href="/admin/pages/add/{$doc.id}/"><img src="/res/img/admin/add_icon.gif" /></a>
                            <a href="/admin/pages/edit/{$doc.id}"><img src="/res/img/admin/edit.gif" /></a>
							{if $doc.is_admin == 0}{if !$doc.parent}<a class="delete" href="#" rel="{$doc.name}"><img src="/res/img/admin/delete_icon.gif" /></a>{/if}{/if}
                        </td>
                    </tr>
                    {/if}
                    {if $doc.parent}
                        {foreach from=$doc.parent item=doc}
                        {if $doc.is_admin != 1}
                        <tr class="page" id="{$doc.id}">
                            <th><img src="/res/img/admin/page.png" /><img src="/res/img/admin/sub_category_icon.gif" class="left"  style="padding-left:40px;"/><a href="/admin/pages/edit/{$doc.id}">{$doc.name}</a></th>
                            <td>{$doc.description}</td>
                            <td class="edit">
								<img src="/res/img/admin/plus_off.gif" />
                                <a href="/admin/pages/edit/{$doc.id}"><img src="/res/img/admin/edit.gif" /></a>
								{if $doc.is_admin == 0}{if !$doc.parent}<a class="delete" href="#" rel="{$doc.name}"><img src="/res/img/admin/delete_icon.gif" /></a>{/if}{/if}
                            </td>
                        </tr>
                        {/if}
                        {/foreach}
                    {/if}
                    {/foreach}
                {/if}
				{/foreach}
			{/if}
			{/foreach}
			</tbody>
		</table>
		</div>
	</div>
<div class="loading px150 center paddingtb paddinglr" style="text-align: center; margin-top: 20px;"><img src="/res/img/admin/preloader.gif" /><br />Отправка данных....</div>
<div class="success"></div>